﻿@model IEnumerable<Sis.Entities.VentaRegistrada>

@{
    ViewBag.Title = "Index";
}

<h1>Listado de Ventas Realizadas</h1>
@using (Html.BeginForm())
        { 
            <table>
                <tr>
                    <td><b>Criterio:</b></td>
                    <td>@Html.TextBox("criterio",null, new { @class = "form-control input-sm" })</td>
                    <td>
                        <button type="submit" name="btnBuscar" class="btn btn-success btn-sm" value="Buscar">
                            <span class="glyphicon glyphicon-search" aria-hidden="true"></span> Buscar
                        </button>
                    </td>
                </tr>
            </table>        
        }
<br />
<table class="table table-striped">
    <p>
        @Html.ActionLink(" Nueva Venta", "Create",null , new{@class="glyphicon glyphicon-plus btn btn-warning"})
        @Html.ActionLink(" Generar Reporte", "Reportes",null , new{@class="glyphicon glyphicon-list-alt btn btn-info"})
    </p>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.FechaVenta)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TipoVenta)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NSolicitud)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FormaPago)
        </th>
        <th>
            @Html.DisplayName("Promotor")
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NVoucher)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NDeposito)
        </th>
        <th>
            @Html.DisplayName("RUC - Cliente")                  
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Marca)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Modelo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Nomenclatura)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NTelefonico)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PrecioVenta)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.FechaVenta)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.TipoVenta)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.NSolicitud)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FormaPago)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IdPromotor)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.NVoucher)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.NDeposito)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DniRuc)
                @Html.DisplayFor(modelItem => item.Nombres)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Marca)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Modelo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Nomenclatura)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.NTelefonico)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PrecioVenta)
            </td>
            @*<td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>*@
        </tr>
    }

</table>
